import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

// import './assets/main.css'
// 引入初始化样式文件
import '@/styles/common.scss'

// 引入懒加载指令插件并且注册（自定义的插件
import { lazyPlugin } from './directives/index'
import { componentsPlugin } from './directives/components'

const app = createApp(App)
// pinia持久化插件
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

// app.use(createPinia())
app.use(pinia)

app.use(router)
app.mount('#app')
// 注册懒加载插件
app.use(lazyPlugin)
app.use(componentsPlugin)


